package com.yami.shop.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yami.shop.bean.model.Post;
import com.yami.shop.bean.model.TopicParticipation;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.common.util.PageParam;
import org.apache.commons.lang3.StringUtils;

import java.util.List;

/**
 * <p>
 * 用于记录用户参与的话题及其相关的动态 服务类
 * </p>
 *
 * @author EXiaoKe
 * @since 2025-04-14
 */
public interface TopicParticipationService extends IService<TopicParticipation> {
    /**
     *
      * @param topicId
     * @return
     */
    Integer countParticipations(Long topicId);

    TopicParticipation pageByPage(PageParam page, TopicParticipation topic);

    List<Long> findTopicIdsByPostId(Long postId);

    /**
     * 添加话题和帖子关联信息
     * @param topic
     * @param postId
     */
    void addTopicWithPost(Long topicId, Long postId);
}
